package xin.baizhiedu.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;

/**
 SELECT
 COUNT( 1 ) AS total,
 COUNT( CASE WHEN  TEAM_NAME='VCR'  THEN 1 END ) AS VCR_TOTAL,
 COUNT( CASE WHEN  TEAM_NAME='IGS产线'  THEN 1 END ) AS IGS_TOTAL
 FROM
 (
 SELECT
 a.JOB_PID,a.TEAM_NAME
 FROM
 T_PLAN_JOB a,
 ( SELECT JOB_ID FROM T_PLAN_JOB WHERE JOB_TYPE = 'PLAN.t_plan_Job.Job_Type.002' AND JOB_DIVISION = '1' ) b
 WHERE
 a.JOB_NAME LIKE '%气柜检验组%'
 AND ( a.STUT_STATECODE = 'PLAN.t_plan_Job.STUT_StateCode.018' OR a.STUT_STATECODE = 'PLAN.t_plan_Job.STUT_StateCode.014' )
 AND TRUNC( a.JOB_ACTUALSTARTTIME ) = TRUNC( SYSDATE )
 AND a.JOB_ACTUALSTARTTIME IS NOT NULL
 AND a.JOB_PID = b.JOB_ID
 )
 */
@Data
@TableName(value = "QG_JOB_CHECK", autoResultMap = true)
public class qgJobCheck implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 总数
     */
    @TableField(value = "TOTAL")
    private BigDecimal total;

    /**
     * 总数
     */
    @TableField(value = "VCR_TOTAL")
    private BigDecimal vcrTotal;

    /**
     * 总数
     */
    @TableField(value = "IGS_TOTAL")
    private BigDecimal igsTotal;
}
